/**
 * Created with IntelliJ IDEA.
 * Description:
 * https://gitee.com/li--jiaqiang/java-test.git
 * git pull
 * git pull origin master
 * git pull origin master --allow-unrelated-histories
 * User: 86187
 * Date: 2022-04-22
 * Time: 22:48
 */

//Scanner scan = new Scanner(System.in);

import java.util.Arrays;
import java.util.Scanner;

public class TestNode {

    /**
     * 逆置数字
     * @param array
     */
    public static void reserve(int[] array) {
        int left = 0;
        int right = array.length - 1;
        int tmp = 0;
        while(left < right) {
            tmp = array[left];
            array[left] = array[right];
            array[right] = tmp;
            left++;
            right--;
        }
    }

    public static void main(String[] args) {
        int[] array = {3,5,7,1,6,4,25,76,45,521};
        reserve(array);

        System.out.println(Arrays.toString(array));
        System.out.println();
    }

}
